/**
 * Created by hcadmin on 16/5/16.
 */
define([
    "jquery",
    "IO",
    "UPLOADUI",
    "UPLOAD",
    "jqueryUI",
    "bootbox"
], function($,IO,jui,upui,up,bootbox,definebt) {
    $(function(){
        gettable();
    });
    function gettable(){

        var grid;
        //每列数据列性
        var columns = [
            {
                title: '序号',
                dataIndex: 'order',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + datarow+1 + "</span>";

                }
            },
            {
                title: '服务类别',
                dataIndex: 'name',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + data[datarow].name+ "</span>";
                }
            },
            {
                title: '服务数量',
                dataIndex: 'count',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + data[datarow].count + "</span>";

                }
            },
            {
                title: '操作',
                dataIndex: 'action',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<a href='service_people_list?company_id='  class='details'><span style='color: #6ab7ad;'>" + "查看服务人员" + "</span></a>";
                }
            }
        ];
        //数组初始化

        function dataInit() {

            grid = new Grid("/api/servicetype/list", $("#table_my_toast"), $("#paging_my_toast"), 1, 10, columns, get_input_param(), 10);

            //初始化
            grid.Init();
        }

        //获取输入框内容
        function get_input_param() {
            var param={};
            return param;
        }
        dataInit();
    }
});